BannerAdView

class BannerAdView : InternalAdView

The view to display banner ads.

Constructors

Link copied to clipboard
constructor(context: Context)

Constructs a new BannerAdView programmatically.

constructor(context: Context, attrs: AttributeSet?)

Constructs a new BannerAdView from XML layout file.

constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int)

Constructs a new BannerAdView from XML layout file.

Properties

Link copied to clipboard

Returns information about loaded Ad.

Link copied to clipboard

Returns actual size after Ad was loaded BannerAdEventListener.onAdLoaded or AdSize from .setAdSize

Link copied to clipboard

Returns the VideoController that provides playback control for video ads.

Functions

Link copied to clipboard
fun addVisibilityChangeListener(listener: ViewVisibilityChangeListener)
Link copied to clipboard
open override fun destroy()

Destroys this BannerAdView entirely and cleans up resources. NOTE: Don't work with this BannerAdView thereafter.

Link copied to clipboard
fun loadAd(adRequest: AdRequest)

Starts loading the ad on a background thread. NOTE: The ad size must be set before calling this method.

Link copied to clipboard
open override fun onAttachedToWindow()
Link copied to clipboard
open override fun onConfigurationChanged(newConfig: Configuration)
Link copied to clipboard
open override fun onDetachedFromWindow()
Link copied to clipboard
open override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)
Link copied to clipboard
open override fun onVisibilityChanged(changedView: View, visibility: Int)
Link copied to clipboard
open override fun onWindowVisibilityChanged(windowVisibility: Int)
Link copied to clipboard
fun removeVisibilityChangeListener(listener: ViewVisibilityChangeListener)
Link copied to clipboard
fun setAdSize(adSize: BannerAdSize)

Sets an BannerAdSize. BannerAdSize can be set only once.

Link copied to clipboard
Link copied to clipboard